package com.smart.mapper;

import com.smart.pojo.ResignBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smart.resp.ResignBillResp;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lyj
 * @since 2023-05-18
 */
public interface ResignBillMapper extends BaseMapper<ResignBill> {

    @Select("select rb.*,u.username username\n" +
            "from resign_bill rb\n" +
            "left join user u\n" +
            "on rb.user_id=u.id\n" +
            "and u.del_flag=0\n" +
            "where rb.del_flag=0\n" +
            "and rb.id=#{billId}")
    ResignBillResp queryByBillId(long billId);
}
